package hist.mobilprogramming.tictactoeapplication;

/**
 * Some calculation methods collected here.
 * @author godtltro
 *
 */
public class Utils
{

	public static int calcNewMax(int maxValue, float decreaseFactor)
	{	
		return maxValue - Math.round(maxValue * decreaseFactor);
	}

	public static int calcMaxDim(int totalWidth, int elementWidth)
	{
		if (elementWidth == 0)
			return 0;
		
		return totalWidth / elementWidth;
	}

	
}
